home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / LINUX / IF_PACKE.{6B < prev    next >
Text File  |  1999-09-17  |  1KB  |  51 lines

  1. #ifndef __LINUX_IF_PACKET_H
  2. #define __LINUX_IF_PACKET_H
  3.  
  4. struct sockaddr_pkt
  5. {
  6.     unsigned short spkt_family;
  7.     unsigned char spkt_device[14];
  8.     unsigned short spkt_protocol;
  9. };
  10.  
  11. struct sockaddr_ll
  12. {
  13.     unsigned short    sll_family;
  14.     unsigned short    sll_protocol;
  15.     int        sll_ifindex;
  16.     unsigned short    sll_hatype;
  17.     unsigned char    sll_pkttype;
  18.     unsigned char    sll_halen;
  19.     unsigned char    sll_addr[8];
  20. };
  21.  
  22. /* Packet types */
  23.  
  24. #define PACKET_HOST        0        /* To us        */
  25. #define PACKET_BROADCAST    1        /* To all        */
  26. #define PACKET_MULTICAST    2        /* To group        */
  27. #define PACKET_OTHERHOST    3        /* To someone else     */
  28. #define PACKET_OUTGOING        4        /* Outgoing of any type */
  29. /* These ones are invisible by user level */
  30. #define PACKET_LOOPBACK        5        /* MC/BRD frame looped back */
  31. #define PACKET_FASTROUTE    6        /* Fastrouted frame    */
  32.  
  33. /* Packet socket options */
  34.  
  35. #define PACKET_ADD_MEMBERSHIP        1
  36. #define PACKET_DROP_MEMBERSHIP        2
  37.  
  38. struct packet_mreq
  39. {
  40.     int        mr_ifindex;
  41.     unsigned short    mr_type;
  42.     unsigned short    mr_alen;
  43.     unsigned char    mr_address[8];
  44. };
  45.  
  46. #define PACKET_MR_MULTICAST    0
  47. #define PACKET_MR_PROMISC    1
  48. #define PACKET_MR_ALLMULTI    2
  49.  
  50. #endif
  51.